<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>为什么使用数组</title>
</head>
<body>
<script>
    // 保存班级中所有学生的名字
    var name1 = "Tom"
    var name2 = "Lily"
    var name3 = "Lucy"
    var name4 = "Lilei"
    var name5 = "Coderwhy"

    // 使用数组来保存学生名字
    var names = ["Tom", "Lily", "Lucy", "Lilei", "Coderwhy"]
</script>
</body>
</html>